<<template>
    <el-card class="box-card" style="width: 800px;margin:20px 0px 0px 20px;">
        <div>
            <span>姓名:</span>
            <span style="margin-left: 400px;">工号:</span>
        </div>
        <div style="margin-top: 20px;">
            <span>用户名:</span>
            <span style="margin-left: 384px;">性别:</span>
        </div>
        <div style="margin-top: 20px;">
            <span>部门:</span>
            <span style="margin-left: 400px;">岗位:</span>
        </div>
        <div style="margin-top: 20px;">
            <span>手机:</span>
        </div>
        <div style="margin-top: 20px;">
            <span style="display: flex;">
                头像:
                <el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card"
                    :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
                    <i class="el-icon-plus"></i>
                </el-upload>
                <el-dialog :visible.sync="dialogVisible">
                    <img width="100%" :src="dialogImageUrl" alt="">
                </el-dialog>
            </span>
        </div>
        <el-button type="primary" style="margin-top: 20px;">保存</el-button>
    </el-card>
</template>

    <script>
    export default {
        data() {
            return {
                dialogImageUrl: '',
                dialogVisible: false
            };
        },
        methods: {
            handleRemove(file, fileList) {
                console.log(file, fileList);
            },
            handlePictureCardPreview(file) {
                this.dialogImageUrl = file.url;
                this.dialogVisible = true;
            }
        }
    }
</script>

    <style></style>